package com.tenghu.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Arvin
 * @date 2018/9/29 14:34
 */
@RestController
@RequestMapping(path = "/demo")
public class IndexController {
    @GetMapping(path = "/hi")
    public String sayHello(@RequestParam(name = "name",required = false,defaultValue = "zhangsan") String name){
        return name;
    }
}
